package com.bjsxt.chapter5_adapter;

/**
 * @ClassName Client
 * @Description 客户端
 * @Author 黑马程序员
 * @Date 15:07 2024/6/21
 * @Version 1.0
 **/
public class Client {

    public void test(Target t){
        t.handleReq();
    }

    public static void main(String[] args) {
        // 类适配器
        /*Client client = new Client();
        Adapter adapter = new Adapter();
        client.test(adapter);*/

        // 对象适配器
        Client client = new Client();
        Adaptee adaptee = new Adaptee();
        Adapter2 adapter = new Adapter2(adaptee);
        client.test(adapter);
    }
}
